Thanks for trying my adventure game engine. The ShadowGate adventure created by Nina0116 is the only completed adventure for the engine. It's a port of the original ShadowGate game on the Nintendo Entertainment System. Despite the difficulties of working with the scripting engine Nina0116 has done a great job with this adventure. Congratulations Nina0116! I also want to thank Allan Thompson for his help in testing the game. Testing can be quite time consuming and he has my appreciation for his effort.
An adventure game generally consists of you being the main character and exploring the game through inspecting, taking, using, talking, and combining various objects. In the sighted world this is done through displaying locations as images and allowing the player to point and click with either an eye, hand, mouth, walk, or item cursor. In the audio gaming world these same actions are supported via menus. the BAVISoft games Grizzly Gulch and ChillingHam are the best examples of audio versions of these games.
The following keys are only available once you have started the ShadowGate adventure.
It's worth noting that you can press the first letter of a menu item to quickly jump to that item in the menu. This can be a big time saver when your inventory gets large.
Creating your own adventure is a challenging and time consuming task. It requires you to be able to write code which means you'll need to understand the basics of programming or scripting.
Unlike my Tactical Battle game which allows map creation without any scripting the Adventure Game Engine relies very heavily on scripting. It gives you all the power that comes with writing code and all the heart ache as well.
That said, AGE does present a very friendly way of defining locations, objects and menus. That coupled with the engine handling all the low level tasks of managing the current state, playing music, playing sounds and supporting saving and loading out of the box gives you a huge headstart for writing your own games in this genre. If you're interested in writing your own adventure read the rest of this manual and definitely write me an email to let me know. My email is support@BlindAudioGames.com.
In the Data for AG folder you will find 3 interesting folders.
One of the best ways to learn is by looking at examples. Start by looking at the Main Menu.txt file to see how the Play ShadowGate by nina0116 menu item was defined. Next you would go find the Start Menu.txt file in the Adventures\Shadowgate\Menus folder to see how that works. From there you can see that the Start Game menu item references the outside shadowgate.txt file defined in the locations folder. You can continue following the code to see how things work and play along in the game as well.
Each location file has the following format.
Each object file has the following format.
Actions are inspect, use, take, and talk. You can also specify what happens if you use an object in your inventory on this object. For example, if you are in the bucket file and want to define what happens when the rope is used on the bucket it would look like this:
You can also put the word inv in front of actions to indicate that this text is only spoken if the action is performed on the object while it is in your inventory. In this way you could have inspect and inv inspect as you might get a more informative message about something when it is in your inventory. For example, if we are in the silver ring file we might define these actions:
Adding the takeable flag tells the engine that it should handle removing the item from the location and placing it in the inventory when the player attempts to take it. This saves unnecessary scripting for a common task such as taking items.
The engine uses javascript as the scripting language. I've tried to simplify how to define core parts of the game like locations and objects by using a custom file format for each. Within these files you can sometimes specify that you want to run a script rather than just have the text spoken. For example in a well object file you might have the following line:
The @ sign after the | indicates that you want to run javascript instead of speaking the text. So in this scenario whenever a player uses the rope and bucket object on the well it will run the javascript to the right of the @ sign.
After all the action lines in a location or object you will often see a line with a single @ sign on it. This indicates that the rest of the file is javascript. This is a good place to define a function such as use_rope_and_bucket_on_well. Then you can have all your code at the bottom of files and little snippets of code to call your functions on the action lines.
There are many examples in the ShadowGate files, look through them to see some of the things you can do.
When the game says there is a script error you can read the error in the Data for AG\ScriptError.txt file.
Here is a list of the functions that the engine exposes to the Javascript. Note that built in Javascript functions such as Math.random are also available. I've put example parameters in each of the functions below to give a feel for how the function would be used. If you have questions please contact me at support@BlindAudioGames.com.
The sound function can also take a second parameter which is a JSON object with certain property specifying options you want. Options have reasonable defaults if you do not set them and as demonstrated above you don't have to pass the options object at all.
The above function ends the playing of the footsteps sound after 4 seconds, it does this because the sound actually plays for a much longer time if you play the whole thing. synchronous means that the sound will play and the script will wait for it to play before continueing. In this scenario we wanted to play footsteps and wait before more text was spoken. If you wanted the footsteps to play at the same time as more text was spoken you would set synchronous to false or just leave it off all together as false is the default for that option.
Repeat makes it so the sound will play in a loop and never stop. Restart set to false makes it so if the sound is already playing and you come across a script that would play it again it will not restart the sound and just leave it playing the way it was.
There are 2 scripting events that are useful in location files:
And 3 events that are useful in menus:
The onEnter and onExit events should be avoided in location files as they do not correspond to when you arrive in the location and when you leave it which will give undesired behavior. The ShadowGate adventure was written before the onArrive event came into existence which is why it uses the onEnter event in so many places.
Thanks for playing AGE and I hope you enjoy Nina0116's ShadowGate adventure. Creating the Adventure Game Engine has been a great learning experience for me. The code I've written and the knowledge I've gained from it will benefit Tactical Battle and future game engines I plan on creating.
Written by Ian Reed